Notify
Cross-platform filesystem notification library for Rust.
Install
[]
= "2.6.2"
Usage
extern crate notify;
use Receiver;
use sync_channel;
use thread;
use ;
use channel;
Platforms
- Linux / Android: inotify
- OS X: FSEvent
- Windows: ReadDirectoryChangesW
- All platforms: polling
Limitations
FSEvent
Due to the inner security model of FSEvent (see FileSystemEventSecurity), some event cannot be observed easily when trying to follow files that do not belong to you. In this case, reverting to the pollwatcher can fix the issue, with a slight performance cost.
Todo
- BSD / OS X / iOS: kqueue
- Solaris 11: FEN
Pull requests and bug reports happily accepted!
Origins
Inspired by Go's fsnotify, born out of need for cargo watch, and general frustration at the non-existence of C/Rust cross-platform notify libraries.
Written by FĂ©lix Saparelli and awesome contributors, and released in the Public Domain using the Creative Commons Zero Declaration.